home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 7
/
FM Towns Free Software Collection 7.iso
/
taropyon
/
zmodem
/
src
/
rz.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-11-30
|
2KB
|
80 lines
#ifndef _RZ_H
#define _RZ_H
#ifndef OK
# define OK 0
#endif
#ifndef FALSE
# define FALSE 0
#endif
#ifndef TRUE
# define TRUE 1
#endif
#ifndef ERROR
# define ERROR (-1)
#endif
/*
* Max value for HOWMANY is 255. A larger value reduces system overhead but
* may evoke kernel bugs. 133 corresponds to an XMODEM/CRC sector
*/
#ifndef HOWMANY
# define HOWMANY 133
#endif
/* Ward Christensen / CP/M parameters - Don't change these! */
#define ENQ 005
#define CAN ('X'&037)
#define XOFF ('s'&037)
#define XON ('q'&037)
#define SOH 1
#define STX 2
#define EOT 4
#define ACK 6
#define NAK 025
#define CPMEOF 032
#define WANTCRC 0103 /* send C not NAK to get crc not checksum */
#define TIMEOUT (-2)
#define RCDO (-3)
#define GCOUNT (-4)
#define ERRORMAX 5
#define RETRYMAX 5
#define WCEOT (-10)
#define PATHLEN 257 /* ready for 4.2 bsd ? */
#define UNIXFILE 0xF000 /* The S_IFMT file mask bit for stat */
static long getfree(void);
static void usage(void);
static void vfile( CONST char *form, ... );
static int wcreceive(int argc, char **argp);
static int wcrxpn(char *rpn);
static int wcrx(void);
static int wcgetsec(char *rxbuf, int maxtime);
static int readline(int timeout);
static void purgeline(void);
static int procheader(char *name);
static void openit(char *name, char *openmode);
static int make_dirs(register char *pathname);
static int putsec(char *buf, register n);
static void sendline(int c);
static void flushmo(void);
static void flushmoc(void);
static char *substr(register char *s, register char *t);
static void zperr(char *form, ... );
static void canit(void);
static void report(int sct);
static void chkinvok(char *s);
static void checkpath(char *name);
static int tryz(void);
static int rzfiles(void);
static int rzfile(void);
static void zmputs(char *s);
static int closeit(void);
static void ackbibi(void);
static void bttyout(int c);
static int sys2(register char *s);
static void exec2(register char *s);
#endif